<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>manager</title>
	<link rel="stylesheet" type="text/css" href="styles/common.css">
	<link rel="stylesheet" type="text/css" href="styles/addbook.css">
<style type="text/css">
.addbook{ width: 100px; height: 30px; line-height: 30px; font-size: 16px;float: right;  margin:10px;}

</style>
</head>
<body>
<div>
	<div class="nav" id="">
		<a href="manager">用户管理</a>
		<a class="navactive" href="#">图书管理</a>
		<p>管理员</p>
	</div>
	<form class="search" method="get" action="">
    	<input  class="bname" type="text" name="bookname">
    	<input type="submit" class="searchbtn" value="search">
  	</form>
	<br>
	<input class="addbook" type="button" name="" value="添加图书"/>
	
	<table class="tab" id="">
		<tbody>
  			<tr>
    	 		<th>书的id</th>
     	 		<th>书名</th>
     	 		<th>作者</th>
     	 		<th>出版社</th>
     	 		<th>书的状态</th>
     	 		<th>操作</th>
    		</tr>
			<?php foreach($BookInfo as $value): ?>
			<tr>
    			<td><?php echo e($value['bookid']); ?></td>
		     	<td>《<?php echo e($value['bookname']); ?>》</td>
			    <td><?php echo e($value['author']); ?></td>
			    <td><?php echo e($value['press']); ?></td>
			    <td><?php if($value['status'] == 0): ?> 已借出 <?php else: ?> 在架可借 <?php endif; ?></td>
			    <td><a value="<?php echo e($value['bookid']); ?>" class="delete" href="#">删除</a> <a class="tchange" href="#">修改</a></td>
   			</tr>
			<?php endforeach; ?>
		</tbody>
	</table>
	<!--quit  默认隐藏-->
	<div id="quit">
		<div id="addbook">
			<h2>添加图书</h2>
			<span>书名：</span><input type="text" name="bookname" id="bookname"><br>
			<span>作者：</span><input type="text" name="author" id="author"><br>
			<span>出版社：</span><input type="text" name="press" id="press"><br>
			<input class="btn" id="returnto" type="button" value="return">
			<input class="btn MangerAddbook" id="toaddbook" type="button" value="确认">
		</div>
	</div>
	<!--changebook  默认隐藏-->
	<div id="change">
		<div id="changebook">
			<h2>修改图书</h2>
			<input type="hidden" name="bkid" id="bkid"><br>
			<span>书名：</span><input type="text" name="bookname" id="bkname"><br>
			<span>作者：</span><input type="text" name="author" id="aut"><br>
			<span>出版社：</span><input type="text" name="press" id="pre"><br>
			<input class="btn" id="returntos" type="button" value="return">
			<input class="btn MangerAddbook" id="tochangebook" type="button" value="确认">
		</div>
	</div>
</div>
</body>
<script src="script/jquery-3.1.1.min.js"></script>
<script src="script/bookmanger.js"></script>
</html>